<div data-ng-controller="financeIndex">
<div class="page page-table" >
    <div class="panel panel-default">
        <div class="panel-heading"><strong><span class="glyphicon glyphicon-th">
                    </span>&nbsp;&nbsp;&nbsp;&nbsp;公积金汇总</strong>
        </div>
        <div class="panel-body">
            <div class="media">
                <div class="media-body">
                    <ul class="list-unstyled list-info">
                        <li>
                            <span class="icon glyphicon glyphicon-plus"></span>
                            <label>收&nbsp;入&nbsp;汇&nbsp;总</label>
                            <label id="leftMoney" style="width: 100px;display: inline-block;" class="btn-lg text-primary">{{leftMoney}}</label>
                            <a href="" data-ng-click="openAddIncome()" style="margin-left: 50px;" class="btn btn-primary">收入</a>
                        </li>
                        <li>
                            <span class="icon glyphicon glyphicon-minus"></span>
                            <label>支&nbsp;出&nbsp;汇&nbsp;总</label>
                            <label id="payMoney" style="width: 100px;display: inline-block;" class="btn-lg text-danger">{{payMoney}}</label>
                            <a href="" data-ng-click="openAddPay()" style="margin-left: 50px;" class="btn btn-danger">支出</a>
                            <div style="margin-right:200px;" class="pull-right">
                                <label>余&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;额</label>
                                <label style="margin-left:-30px;" id="yueCount" class="btn-lg text-danger">{{yueCount}}</label>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="page page-table" style="margin-top: -30px;">
    <div class="panel panel-default">
        <div class="panel-heading"><strong><span class="glyphicon glyphicon-th">
                    </span>&nbsp;&nbsp;&nbsp;&nbsp;公积金列表</strong>
        </div>
        <div class="panel-body">
            <div>
                <ul class="nav nav-tabs" ng-init="activeTab=2">
                    <li ng-class="{active: activeTab == 2}"><a href="javascript:;" ng-click="activeTab = 2">支出列表</a></li>
                    <li ng-class="{active: activeTab == 1}"><a href="javascript:;" ng-click="activeTab = 1">收入列表</a></li>
                </ul>
                <div class="tab-content tab-bordered">
                    <div class="tab-panel" ng-show="activeTab == 1">
                        <div class="panel panel-default table-dynamic">
                            <div class="table-filters">
                                <form>
                                    <div class="row">
                                        <div  class="col-sm-4">
                                            <div class="input-group ui-datepicker" data-ng-controller="DatepickerDemoCtrl">
                                                <span class="input-group-addon"><i class="fa fa-calendar"></i>&nbsp;&nbsp;开始</span>
                                                <input type="text"
                                                       id="incomeStartTime"
                                                       class="form-control"
                                                       datepicker-popup="yyyy-MM-dd"
                                                       ng-model="dt"
                                                       is-open="opened"
                                                       datepicker-options="dateOptions"
                                                       ng-required="true"
                                                       close-text="关闭">
                                            </div>
                                        </div>
                                        <div class="col-sm-4">
                                            <div class="input-group ui-datepicker" data-ng-controller="DatepickerDemoCtrl">
                                                <span class="input-group-addon"><i class="fa fa-calendar"></i>&nbsp;&nbsp;结束</span>
                                                <input type="text"
                                                       id="incomeEndTime"
                                                       class="form-control"
                                                       datepicker-popup="yyyy-MM-dd"
                                                       ng-model="dt"
                                                       is-open="opened"
                                                       datepicker-options="dateOptions"
                                                       ng-required="true"
                                                       close-text="关闭">
                                            </div>
                                        </div>
                                        <div class="col-sm-2"><a class="btn btn-primary" data-ng-click="pageChange(1,true)">查询</a></div>
                                    </div>
                                </form>
                            </div>
                            <footer class="table-footer">
                                <div class="row">
                                    <div class="col-md-6 page-num-info">
                                    <span>
                                    显示 共{{pageSize}}页 {{total}}条
                                    </span>
                                    </div>
                                    <div class="col-md-6 text-right pagination-container">
                                        <pagination class="pagination-sm"
                                                    page="pageNum"
                                                    total-items="pageSize"
                                                    max-size="5"
                                                    on-select-page="pageChange(page)"
                                                    items-per-page="numPerPage"
                                                    rotate="true"
                                                    boundary-links="true"></pagination>
                                    </div>
                                </div>
                            </footer>
                            <table class="table table-bordered table-striped table-responsive">
                                <thead>
                                <tr>
                                    <th style="width:140px;">
                                        <div class="th">
                                            时间
                        <span class="glyphicon glyphicon-chevron-up"
                              data-ng-click=" incomeOrder('date') "
                              data-ng-class="{active: row == 'date'}"></span>
                        <span class="glyphicon glyphicon-chevron-down"
                              data-ng-click=" incomeOrder('-date') "
                              data-ng-class="{active: row == '-date'}"></span>
                                        </div>
                                    </th>
                                    <th>
                                        <div class="th">
                                            摘要
                        <span class="glyphicon glyphicon-chevron-up"
                              data-ng-click=" incomeOrder('remark') "
                              data-ng-class="{active: row == 'remark'}"></span>
                        <span class="glyphicon glyphicon-chevron-down"
                              data-ng-click=" incomeOrder('-remark') "
                              data-ng-class="{active: row == '-remark'}"></span>
                                        </div>
                                    </th>
                                    <th>
                                        <div class="th">
                                            金额
                        <span class="glyphicon glyphicon-chevron-up"
                              data-ng-click=" incomeOrder('money') "
                              data-ng-class="{active: row == 'money'}"></span>
                        <span class="glyphicon glyphicon-chevron-down"
                              data-ng-click=" incomeOrder('-money') "
                              data-ng-class="{active: row == '-money'}"></span>
                                        </div>
                                    </th>
                                    <th>
                                        <div class="th">
                                            余额
                        <span class="glyphicon glyphicon-chevron-up"
                              data-ng-click=" incomeOrder('balance') "
                              data-ng-class="{active: row == 'balance'}"></span>
                        <span class="glyphicon glyphicon-chevron-down"
                              data-ng-click=" incomeOrder('-balance') "
                              data-ng-class="{active: row == '-balance'}"></span>
                                        </div>
                                    </th>
                                    <th>
                                        <div class="th">
                                            添加人
                        <span class="glyphicon glyphicon-chevron-up"
                              data-ng-click=" incomeOrder('addUId') "
                              data-ng-class="{active: row == 'date'}"></span>
                        <span class="glyphicon glyphicon-chevron-down"
                              data-ng-click=" incomeOrder('-addUId') "
                              data-ng-class="{active: row == '-addUId'}"></span>
                                        </div>
                                    </th>
                                    <th style="width: 35%">
                                        <div class="th">
                                            备注
                                        </div>
                                    </th>
                                    <th data-ng-show="userPerHide">操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr data-ng-repeat="info in incomeInfo">
                                    <td>{{info.date | dataFormat}}</td>
                                    <td>{{info.remark}}</td>
                                    <td>{{info.money}}</td>
                                    <td>{{info.balance}}</td>
                                    <td>{{info.addUId}}</td>
                                    <td>{{info.note}}</td>
                                    <td style="font-size: 14px;" data-ng-show="userPerHide">
                                        <a style="color:#ff9d33;" data-ng-click="del(info.id,info.money,true)" href="">删除</a>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <div class="tab-panel" ng-show="activeTab == 2">
                        <div class="panel panel-default table-dynamic">
                            <div class="table-filters">
                                <form>
                                    <div class="row">
                                        <div  class="col-sm-4">
                                            <div class="input-group ui-datepicker" data-ng-controller="DatepickerDemoCtrl">
                                                <span class="input-group-addon"><i class="fa fa-calendar"></i>&nbsp;&nbsp;开始</span>
                                                <input type="text"
                                                       id="payStartTime"
                                                       class="form-control"
                                                       datepicker-popup="yyyy-MM-dd"
                                                       ng-model="dt"
                                                       is-open="opened"
                                                       datepicker-options="dateOptions"
                                                       ng-required="true"
                                                       close-text="关闭">
                                            </div>
                                        </div>
                                        <div id="endDiv" class="col-sm-4">
                                            <div class="input-group ui-datepicker" data-ng-controller="DatepickerDemoCtrl">
                                                <span class="input-group-addon"><i class="fa fa-calendar"></i>&nbsp;&nbsp;结束</span>
                                                <input type="text"
                                                       id="payEndTime"
                                                       class="form-control"
                                                       datepicker-popup="yyyy-MM-dd"
                                                       ng-model="dt"
                                                       is-open="opened"
                                                       datepicker-options="dateOptions"
                                                       ng-required="true"
                                                       close-text="关闭">
                                            </div>
                                        </div>
                                        <div class="col-sm-2"><a class="btn btn-primary" data-ng-click="pageChangePay(1,true)">查询</a></div>
                                    </div>
                                </form>
                            </div>
                            <footer class="table-footer">
                                <div class="row">
                                    <div class="col-md-6 page-num-info">
                                            <span>
                                                显示 共{{payPageSize}}页  {{payTotal}}条
                                            </span>
                                    </div>
                                    <div class="col-md-6 text-right pagination-container">
                                        <pagination class="pagination-sm"
                                                    page="pageNum"
                                                    total-items="payPageSize"
                                                    max-size="5"
                                                    on-select-page="pageChangePay(page)"
                                                    items-per-page="numPerPage"
                                                    rotate="true"
                                                    boundary-links="true"></pagination>
                                    </div>
                                </div>
                            </footer>
                            <table class="table table-bordered table-striped table-responsive">
                                <thead>
                                <tr>
                                    <th style="width:140px;">
                                        <div class="th">
                                            时间
                        <span class="glyphicon glyphicon-chevron-up"
                              data-ng-click=" payOrder('date') "
                              data-ng-class="{active: row == 'date'}"></span>
                        <span class="glyphicon glyphicon-chevron-down"
                              data-ng-click=" payOrder('-date') "
                              data-ng-class="{active: row == '-date'}"></span>
                                        </div>
                                    </th>
                                    <th>
                                        <div class="th">
                                            摘要
                        <span class="glyphicon glyphicon-chevron-up"
                              data-ng-click=" payOrder('remark') "
                              data-ng-class="{active: row == 'remark'}"></span>
                        <span class="glyphicon glyphicon-chevron-down"
                              data-ng-click=" payOrder('-remark') "
                              data-ng-class="{active: row == '-remark'}"></span>
                                        </div>
                                    </th>
                                    <th>
                                        <div class="th">
                                            金额
                        <span class="glyphicon glyphicon-chevron-up"
                              data-ng-click=" payOrder('money') "
                              data-ng-class="{active: row == 'money'}"></span>
                        <span class="glyphicon glyphicon-chevron-down"
                              data-ng-click=" payOrder('-money') "
                              data-ng-class="{active: row == '-money'}"></span>
                                        </div>
                                    </th>
                                    <th>
                                        <div class="th">
                                            余额
                        <span class="glyphicon glyphicon-chevron-up"
                              data-ng-click=" incomeOrder('balance') "
                              data-ng-class="{active: row == 'balance'}"></span>
                        <span class="glyphicon glyphicon-chevron-down"
                              data-ng-click=" incomeOrder('-balance') "
                              data-ng-class="{active: row == '-balance'}"></span>
                                        </div>
                                    </th>
                                    <th>
                                        <div class="th">
                                            报销人
                        <span class="glyphicon glyphicon-chevron-up"
                              data-ng-click=" payOrder('applyUser') "
                              data-ng-class="{active: row == 'applyUser'}"></span>
                        <span class="glyphicon glyphicon-chevron-down"
                              data-ng-click=" payOrder('-applyUser') "
                              data-ng-class="{active: row == '-applyUser'}"></span>
                                        </div>
                                    </th>
                                    <th>
                                        <div class="th">
                                            审批人
                        <span class="glyphicon glyphicon-chevron-up"
                              data-ng-click=" payOrder('approveUser') "
                              data-ng-class="{active: row == 'approveUser'}"></span>
                        <span class="glyphicon glyphicon-chevron-down"
                              data-ng-click=" payOrder('-approveUser') "
                              data-ng-class="{active: row == '-approveUser'}"></span>
                                        </div>
                                    </th>
                                    <th>
                                        <div class="th">
                                            添加人
                        <span class="glyphicon glyphicon-chevron-up"
                              data-ng-click=" payOrder('addUId') "
                              data-ng-class="{active: row == 'addUId'}"></span>
                        <span class="glyphicon glyphicon-chevron-down"
                              data-ng-click=" payOrder('-addUId') "
                              data-ng-class="{active: row == '-addUId'}"></span>
                                        </div>
                                    </th>
                                    <th>
                                        <div class="th">
                                            备注
                                        </div>
                                    </th>
                                    <th style="width: 15%;">操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr data-ng-repeat="info in payInfo">
                                    <td>{{info.date | dataFormat}}</td>
                                    <td>{{info.remark}}</td>
                                    <td>{{info.money}}</td>
                                    <td>{{info.balance}}</td>
                                    <td>{{info.applyUser}}</td>
                                    <td>{{info.approveUser}}</td>
                                    <td>{{info.addUId}}</td>
                                    <td>{{info.note}}</td>
                                    <td style="font-size: 12px;">
                                        <a style="color:#ff9d33;" data-ng-hide="{{info.imgCount | imgCount}}" data-ng-click="openImg(info.id)" href="">票据</a>
                                        &nbsp;&nbsp;&nbsp;&nbsp;<a data-ng-show="userPerHide" style="color:#ff9d33;" data-ng-click="del(info.id,info.money,null)" href="">删除</a>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</div>